<%= form_for [:admin, @shop_category, @option_type], html: { class: "card" } do |f| %>
  <div class="card-body">
    <h3 class="card-title">创建分类属性</h3>
    <div class="row">
      <div class="col-md-6">
        <div class="form-group">
          <label class="form-label">名字</label>
          <%= f.text_field :name, class: "form-control" %>
        </div>
      </div>
      <div class="col-md-6">
        <div class="form-group">
          <label class="form-label">分类</label>
          <%= f.select :shop_category_id, ShopCategory.where(level: 1).select('id, name').map{ |c| [c.name, c.id] }, { include_blank: '请选择分类' }, { class: 'form-control select' } %>
        </div>
      </div>
    </div>
  </div>
  <div class="card-footer text-right">
    <%= f.submit "保 存", class: "btn btn-primary" %>
  </div>
<% end %>